import 'dart:ui';

import 'package:flutter/cupertino.dart';

class CircleBean {
  late Offset offset;
  late Color color;
  late double radius;
}
class BGPainter extends CustomPainter {
  List<CircleBean> list;
  final Paint _paint = Paint()..isAntiAlias = true;
  BGPainter({required this.list});
  @override
  void paint(Canvas canvas, Size size) {
    for (var element in list) {
      _paint.color = element.color;
      canvas.drawCircle(element.offset, element.radius, _paint);
    }
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    return true;
  }
}